# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akonadi-calendar
pkgver=20.04.3
pkgrel=0
pkgdesc="Libraries and daemons to implement basic email handling"
arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by kmailtransport -> libkgapi -> qt5-qtwebengine
url="https://community.kde.org/KDE_PIM"
license="LGPL-2.0-or-later"
depends_dev="ki18n-dev kwidgetsaddons-dev kxmlgui-dev kio-dev kcodecs-dev
	kiconthemes-dev kdbusaddons-dev kmailtransport-dev kidentitymanagement-dev
	kcalendarcore-dev kcalutils-dev akonadi-dev akonadi-contacts-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-calendar-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # Broken

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="d740799699adeab1a730338c446a5089a7936736cf8c36b440c192d53238a351738b26aceba8458b2fad3dc856417014a5b16852e5c2a585b5048971a64c417b  akonadi-calendar-20.04.3.tar.xz"
